# -*-coding:utf-8-*-
"""
根据jinja2模版生成html
"""
from hander.HanderGenHtml import HanderGenHtml
from  dingding import  dingding

def gen_html():
    # 获取图片数据
    data = HanderGenHtml.get_img_path_from_outfile('./outfile')
    # print(data)
    # 生成 html
    HanderGenHtml.gen_html_by_jinja2(
        temp_file='./templates/index/index.html', data_=data, outfile='./www/index.html')

    dingding(title='WEB页面生成信息',news=["WEB页面生成","可通过WEB页面访问指标图表，请点击[指标访问]"])#发送钉钉消息

if __name__ == '__main__':
    gen_html()
